const sq = require('./index');
const { DataTypes } = require('sequelize');
const userGroup = sq.define('userGroup', {
    groupCreatorId: {
        type: DataTypes.INTEGER,
        allowNull: false,
        comment: "创建者的id"
    },
    groupRoom: {
        type: DataTypes.STRING,
        unique: true,
        allowNull: false,
        comment: "群聊的房间号"
    },
    groupName: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "群聊的名字"
    },
    groupAvatar: {
        type: DataTypes.STRING,
        allowNull: false,
        comment: "群聊的头像"
    },
    groupBkimg: {
        type: DataTypes.STRING,
        comment: "背景图片"
    },
    userIdList: {
        type: DataTypes.STRING,
        comment: "在群聊里面的对应人的id值"
    },
    groupNumber: {
        type: DataTypes.INTEGER,
        allowNull: false,
        comment: "群聊的人数"
    }
}, {
    freezeTableName: true,
});
//userGroup.sync({ force: true })
module.exports = userGroup; 